package com.ruicar.afs.cloud.afscase.apply.fegin;

import com.alibaba.fastjson.JSONObject;
import com.ruicar.afs.cloud.afscase.apply.condition.ApplyBusinessConfCondition;
import com.ruicar.afs.cloud.common.core.query.QueryCondition;
import com.ruicar.afs.cloud.common.core.util.IResponse;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.Map;

/**
 * 调用进件fegin
 *
 * @author 耿继辉
 */
@FeignClient(name = "CaseUseApplyServiceFeign", url = "${com.greatwall.services.apply-service.url}")
public interface CaseUseApplyServiceFeign {

    /**
     * 查询
     *
     * @param condition
     * @param headers
     * @return
     */
    @ApiOperation("查询")
    @PostMapping("businessConf/getBusinessConfInfo")
    IResponse getBusinessConfInfo(@RequestBody QueryCondition<ApplyBusinessConfCondition> condition, @RequestHeader Map<String, String> headers);

    /**
     * 查询单个
     *
     * @param condition
     * @param headers
     * @return
     */
    @PostMapping("businessConf/getInfo")
    IResponse getInfo(@RequestBody ApplyBusinessConfCondition condition, @RequestHeader Map<String, String> headers);

    /**
     * 更新
     *
     * @param condition
     * @param headers
     * @return
     */
    @ApiOperation("更新")
    @PostMapping("businessConf/updateBusinessConfInfo")
    IResponse updateBusinessConfInfo(@RequestBody ApplyBusinessConfCondition condition, @RequestHeader Map<String, String> headers);

    /**
     * 删除
     *
     * @param condition
     * @param headers
     * @return
     */
    @ApiOperation("删除")
    @PostMapping("businessConf/deleteBusinessConfInfo")
    IResponse deleteBusinessConfInfo(@RequestBody ApplyBusinessConfCondition condition, @RequestHeader Map<String, String> headers);

    /**
     * 新增
     *
     * @param condition
     * @param headers
     * @return
     */
    @ApiOperation("新增")
    @PostMapping("businessConf/saveBusinessConfInfo")
    IResponse saveBusinessConfInfo(@RequestBody ApplyBusinessConfCondition condition, @RequestHeader Map<String, String> headers);

}
